class_name BuffBoxItem
extends Control

#region 属性
@export var buff_icon: TextureRect
@export var buff_level: Label
var buff:Buff
#endregion
#region 字段
#endregion
#region 信号
#endregion

#region 基类方法
#endregion
#region 公共方法
func init_buff_item(buff:Buff):
	self.buff = buff
	buff_icon.texture = self.buff.buff_sprite
	buff_level.text = str(self.buff.cur_level)
#endregion
#region 私有方法
#endregion
#region 生命周期函数
func _process(delta: float) -> void:
	buff_level.text = str(self.buff.cur_level)
	if buff.cur_level == 0:
		queue_free()
#endregion
